Listing objects in a window with the Window Inspector
Note: text in square brackets [] denotes text spoken by the screenreader.
Welcome to this tutorial on how to use the Window Inspector to view a list of objects in an application window.
In earlier tutorials, we saw how AT Prime makes it possible to tab to controls and objects which do not normally take keyboard focus. This tutorial demonstrates a radically different approach to accessing objects in a window without tabbing at all - the Window Inspector. For those of you who use your screenreader's ability to list links and other objects when using a web browser, the Window Inspector in AT Prime does something very similar, only in relation to desktop applications.
The Window Inspector consists of just a list and a menu bar from which you can select various commands to work with the list and the objects in it. The Window Inspector is a very powerful tool but, in this tutorial, I'm going to show you how it can be used just as a simple way of finding a control or object in an application window and interacting with that object.
[Demo app for AT Prime. Enter your name, edit, There are four ...]
Here's the Demo app for AT Prime and AT Prime is running at the moment. By now, you will have noticed the Window Inspector item on the AT Prime menu and it is that item that I'm going to select.
[Context menu
Text Inspector
Object Inspector
Window Inspector - view a list of accessible objects in the current application window, W
Window Inspector - AT Prime dialog. List. Minimize button, moves the window out of the way, 1 not selected, 1 of 21]
And now the Window Inspector is open and focus is on the first item in the list of objects found in the Demo app window. The objects in this list should be in the same order as the objects we encountered when tabbing for the first time in Optimise Tabbing mode but instead of tabbing, we just go up and down the list using the arrow keys. Here's the Minimize button at the top:
[Minimize button, moves the window out of the way, 1, 1 of 19]
I'm going to arrow down to look at all of the objects in the list but I want to explain the information being spoken by the screenreader as we go.
This first field speaks the name or label of the object, that is, 'Minimize' in this case but then goes on to give us some more information. Here it is again.
[Minimize button, moves the window out of the way, 1, 1 of 19]
After 'Minimize', it says 'button' which tells us, of course, that the object is a button. You will find that each item in the list with some few exceptions have its control or object type mentioned in this way.
After 'button', it says 'moves the window out of the way'. We have seen in earlier tutorials that each control or object can have a longer description in addition to its name or label. This text, 'moves the window out of the way', happens to be the standard text which Windows uses to describe the Minimize button. In many cases, though, you will find this longer description field blank.
Finally, the screenreader announces an ID number. This is a number used internally by AT Prime and you can safely ignore this number.
Pressing the down arrow, the next item is this one:
[Restore button, unavailable, puts a minimized or maximized window back to normal, 2, 2 of 19]
Note that the Restore button's status is being announced as unavailable. Remember that a control in a window might be inactive or greyed out in certain circumstances and, where that is the case, the word 'unavailable' will be shown in its status here in the Window Inspector.
Then we have the Close button which is the last of the three buttons in the title bar.
[Close button, closes the window, 3, 3 of 19]
The next four items in the list all sound the same.
[No name, button, 4, 4 of 19
No name, button, 5, 5 of 19
No name, button, 6, 6 of 19
No name, button, 7, 7 of 19]
Their name or label is 'No name'. The text 'No name' is added by AT Prime to bring to your attention the fact that the application itself has not provided an accessible name for the object. You may recall from earlier tutorials on Optimise Tabbing mode and tabbing schemes, that there were these four buttons just after the Minimize, Restore and Close buttons: and here they are in the Window Inspector. We'll do something about labelling these buttons in another tutorial.
Next, there is the text item:
[Enter your name, text, 8, 8 of 19]
'Enter your name', which is the text label for the corresponding 'Enter your name' edit field. We know this is the text label because the object type column says 'text'.
The next item down is also called 'Enter your name':
[Enter your name, edit, There are 4 buttons in the toolbar. Remember to close the window by selecting the OK button or by pressing alt F4, 9, 9 of 19]
But this time, the object type is 'edit'. This is the edit field which is labelled by the previous item in the list. We also hear the text I entered in the Help text field in the previous tutorial which gives us general information about the Demo app. Where an object has text in the Description or Help text properties, whether provided by the application or by you, it will be shown in the Window Inspector.
Then we have the Gender combo box:
[Gender, combo box, 10, 10 of 19]
The label I gave to that control is the first thing we hear.
Next, there's the longer block of text which describes the purpose of the Demo app:
[This is a simple window which can be used to demonstrate some of AT Prime's powerful features, text, 11, 11, of 19]
And, arrowing down again, we come to the 'I feel good' checkbox:
[I feel good!, checkbox unchecked, 12, 12 of 19]
Note that after the word 'checkbox', the screenreader announces the status of the checkbox - it's currently unchecked.
The next item is the second checkbox and the same applies here.
[All application developers should make their controls accessible, checkbox unchecked, alt a, 13, 13 of 19]
But if you listen again to this item, you will hear the words 'alt a'. This is the keyboard accelerator provided by the app itself, so that if you were to press alt+a in the Demo app window, you would be toggling the state of the checkbox. The first checkbox doesn't have an accelerator. Here it is again:
[I feel good!, checkbox unchecked, 12, 12 of 19]
Arrowing down below the second checkbox, we come to the text label for the 'Pick code# combo box.
[Pick code, text, alt P, 14, 14 of 19]
This is immediately followed by the Pick code combo box itself:
[Pick code, combo box, alt P, 15, 15 of 19]
Note that both the label and the combo box have the accelerator alt+P. Arrowing down,
[Current total, text, 16, 16 of 19]
There is the text label for the Current total edit field and, below that, the Current total edit field itself:
[Current total, edit, Remember to order more stock if the total exceeds 50, 17, 17 of 19]
As with the 'Enter your name' edit field, there's help text for this object and that's shown in the list here.
Then we have the Hello button:
[Hello, button, This is the Hello button, 18, 18 of 19]
With the description I gave earlier and right at the bottom is the Close button:
[OK, button, 19, 19 of 19]
And that's it. There are 19 objects in this list. Being a list, in fact a list view, you can jump to any item in the list by pressing its initial letter. If I go to the top of the list by pressing the Home key:
[Minimize, button, moves the window out of the way, 1, 1 of 19]
I can go straight to the Hello button by pressing 'h'.
[Hello, button, This is the Hello button, 18, 18 of 19]
This is a very fast way of finding a control or object in the list. If you know the name of the control you are looking for, in fact, if there are a few controls all starting with the same letter, you can refine your search by typing the first few letters quickly, just as you can in the windows File explorer.
There would be no real point to this list of objects unless you could interact with the objects in the list, but of course you can. I'm focused on the Hello button in the list - I'll press Enter.
[Demo app dialog. Hello World! OK button]
The message box appears just as if I had pressed Enter on the button itself in the window. Whenever you activate an object in the list like this, the Window Inspector closes and you'll be back in the application window you were working with - in this case, the Demo app.
I'll open the Window Inspector again ...
[Context menu
Window Inspector - At Prime, dialog ... Minimize button, Moves the window out of the way, 1, not selected, 1 of 19]
And press h to jump to the Hello button again.
[Hello, button]
When I saved the description for the Hello button, I used the Object Inspector which I opened from the AT Prime menu when the Hello button had focus. You can also open the Object Inspector to inspect any object in the Window Inspector list. Let's do that just now. I go to the View menu here:
[View submenu, alt V]
And arrow down to find this item:
[Sort list by submenu
Filter list to show a single object type
Object Inspector F6, opens a dialog where you can view or edit information about the selected object, set a hotkey or add as favourite, a]
And I'll press Enter.
[Object Inspector. Name of object, Hello]
The Object Inspector has appeared showing details for the Hello button. Just as before, I can add or change any of the contents of the text fields which are not read-only. I'm going to change the Description text.
[Object type... Description, edit, alt D, This is the Hello button. (after typing) Displays the message 'Hello World!']
And I'll press Enter to save the changes.
[Window Inspector AT Prime dialog. Hello, button, This is the hello button, 18, 18 of 19. Hello, button, Displays the message 'Hello World!', 18]
We can now hear the changed description in the Window Inspector list.
Let's see how you can interact with other kind of objects in the Window Inspector. This time, I'll open the Window Inspector by opening the AT Prime menu and just typing 'w'
[Context menu
Window Inspector AT Prime dialog. List. Minimize button...]
We know now that when you press Enter on a button in the Window Inspector list, it's just like pressing space or Enter on the button when you're focused on the control. I'm going to arrow down past these other buttons at the top of the list until I come to the long text object, the block of text which gives a description of the application window.
[Restore...
Close, button...
No name...
No name...
No name...
No name...
Enter your name...
Enter your name...
Gender...
This is a simple window which can be used to demonstrate some of AT Prime's powerful features]
Now, if I press Enter on this text item, I wouldn't normally expect text to be 'activated' in any way but if I do press Enter on it in the Window Inspector:
[This is a simple window which can be used to demonstrate some of AT Prime's powerful features]
The text is then displayed in the Text Inspector so that you can arrow through the text to read it in more detail and, of course, the text can be selected and copied if you wish.
[Words and characters are heard individually]
Unlike with other objects though, when I escape from the Text Inspector, the Window Inspector remains open so that I can continue to look at other objects in the list.
What would you expect to happen if I were to press Enter on one of the checkboxes in the list? You would expect the status of the checkbox to be toggled. Let's see:
[I feel good!, checkbox unchecked, 12, 12 of 19]
I press Enter:
[I feel good!, checkbox checked]
And the checkbox gains focus in the window and it's now checked. So it doesn't matter what kind of control is shown in the Window Inspector list, if you want to perform the control's default action, as it were, then just press Enter.
Finally, we'll look at the Pick code combo box. Back in the Window Inspector, I'll press Enter on that
[Context menu
Window Inspector AT Prime dialog.
p, p, Pick code, combo box...
Demo app... ABC011D23]
And keyboard focus is now on that control so that I can arrow up and down the list of options.
The Window Inspector offers you a fast way of finding and activating controls in an application window. For example, if all you wanted to do was to select the Hello button, for which there is no keyboard shortcut provided by the application, you could quickly open the Window Inspector, type 'h' and then press Enter, like this:
[screenreader feedback is chopped off as key presses are performed very quickly
Demo app dialog. Hello World! OK button]
That's cool, but it's not that impressive because the Hello button is accessible to you anyway if you were to tab through the application window. What is very powerful though, is that the Window Inspector can let you quickly find and activate controls which do not normally get keyboard focus, like the four unlabelled toolbar buttons for example. I'll get round to showing you that later but since these buttons are unnamed, it would be better if we labelled them first and that's the subject of the next tutorial.
But to finish this tutorial, I'll show you what other kinds of interactions with objects are possible in the Window Inspector. These other kinds of interactions are found in the Actions menu of the Window Inspector. Here's the Actions menu:
[View submenu alt V
Actions submenu alt a]
When I arrow down, you hear that the first item is this:
[Activate object - Enter - such as pressing Enter on an object or double-clicking with the mouse, a]
It explains that this command is the activation which occurs when you press Enter on an item in the list. This command is here just for completeness, since the easiest way to activate an object in the list is simply to press Enter on it.
[Select object - F9 - such as selecting a file in a list, s]
This next one will be rarely used but it could prove useful. You would use this action where you want to select an item in the application window without activating it. The usual example where you might want to do this is in a file list where you might want to select a file without opening it. This command just puts focus on such an item.
[Right click on object - F10 - to display the object's shortcut menu if any, r]
Occasionally, you will come across some controls and objects, such as buttons on a toolbar, which show popup menus when they are clicked with the right mouse button. While it is possible to show such a popup or context menu by pressing the applications key or shift F10 when the control has keyboard focus, you can't do that if the control in question, such as a toolbar button, can't get keyboard focus. This command in the Actions menu will right-click the object which is currently selected in the Window Inspector list.
The next menu command will be used only very rarely:
[Move mouse over object - F11 - place mouse pointer over the object without clicking, m]
Some objects, and not just those having tooltips, cause messages to be displayed whenever the mouse pointer is placed over them without the mouse being clicked. This command will do that for you.
[Speak changes in object's contents - F12 - switch this off later in AT Prime's main menu, c]
This final command in the Actions menu is a very special one which will be covered in a later tutorial. As the menu text explains, you can get AT Prime to monitor for any changes in its text and, if there are changes, AT Prime gets your screenreader to announce them even if you are focused on another control in the application window.
That's all of the actions in the Actions menu so I'll close the menu for now. And, finally, I'll show you how to close the Window Inspector without activating any of the objects in the list.
There are two ways of closing the Window Inspector if you don't want to activate any of the objects. You can either select Exit at the bottom of the View menu, which I'll do now:
[View submenu alt V
Sort list...
Exit, closes the Window Inspector, x]
Or, if you prefer, you can just press alt+F4.